<html>
<head><meta charset="utf-8"><title>how does release branching work? · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/how.20does.20release.20branching.20work.3F.html">how does release branching work?</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="208037126"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/how%20does%20release%20branching%20work%3F/near/208037126" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/how.20does.20release.20branching.20work.3F.html#208037126">(Aug 25 2020 at 23:30)</a>:</h4>
<p>I feel like I'm still a bit confused about how release branching works. For example, when a new beta is branched off, does the source for it include unstable features that get cfg'ed out? In other words, is the beta an exact copy of the nightly that has slightly different configuration or does it work some other way?</p>



<a name="208037186"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/how%20does%20release%20branching%20work%3F/near/208037186" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/how.20does.20release.20branching.20work.3F.html#208037186">(Aug 25 2020 at 23:31)</a>:</h4>
<p>does <a href="https://rustc-dev-guide.rust-lang.org/building/bootstrapping.html#complications-of-bootstrapping">https://rustc-dev-guide.rust-lang.org/building/bootstrapping.html#complications-of-bootstrapping</a> help?</p>



<a name="208037265"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/how%20does%20release%20branching%20work%3F/near/208037265" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/how.20does.20release.20branching.20work.3F.html#208037265">(Aug 25 2020 at 23:32)</a>:</h4>
<p>Exact copy, modulo being built as a beta compiler. This affects stability checking in the compiler, but there are no cfgs involved.</p>



<a name="208037280"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/how%20does%20release%20branching%20work%3F/near/208037280" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/how.20does.20release.20branching.20work.3F.html#208037280">(Aug 25 2020 at 23:32)</a>:</h4>
<p>std itself is identical</p>



<a name="208037505"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/how%20does%20release%20branching%20work%3F/near/208037505" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/how.20does.20release.20branching.20work.3F.html#208037505">(Aug 25 2020 at 23:36)</a>:</h4>
<p>So a beta compiler is built from nightly source code, and there are no <code>cfg</code>s so the binary has all the code for the unstable features, except that it doesn't let you use unstable features? I.e., you could use a stable compiler to compile unstable features as long as they were present when the beta was built? Or am I misunderstanding?</p>



<a name="208037590"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/how%20does%20release%20branching%20work%3F/near/208037590" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/how.20does.20release.20branching.20work.3F.html#208037590">(Aug 25 2020 at 23:37)</a>:</h4>
<blockquote>
<p>you could use a stable compiler to compile unstable features</p>
</blockquote>
<p>yes, using <code>RUSTC_BOOTSTRAP=1</code></p>



<a name="208037591"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/how%20does%20release%20branching%20work%3F/near/208037591" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/how.20does.20release.20branching.20work.3F.html#208037591">(Aug 25 2020 at 23:37)</a>:</h4>
<p>see the link I posted</p>



<a name="208037896"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/how%20does%20release%20branching%20work%3F/near/208037896" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/how.20does.20release.20branching.20work.3F.html#208037896">(Aug 25 2020 at 23:41)</a>:</h4>
<p>I see, I think I get it now! Thanks for the help :)</p>



<a name="208037908"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/how%20does%20release%20branching%20work%3F/near/208037908" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/how.20does.20release.20branching.20work.3F.html#208037908">(Aug 25 2020 at 23:41)</a>:</h4>
<p>Bootstrapping compilers are one of the most mindbending things</p>



<a name="208145183"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/how%20does%20release%20branching%20work%3F/near/208145183" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Notification Bot <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/how.20does.20release.20branching.20work.3F.html#208145183">(Aug 26 2020 at 20:36)</a>:</h4>
<p>This topic was moved by <span class="user-mention silent" data-user-id="116122">simulacrum</span> to <a class="stream-topic" data-stream-id="233931" href="/#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/Require.20users.20to.20confirm.20they.20know.20RUSTC_.E2.80.A6.20compiler-team.23350">#t-compiler/major changes &gt; Require users to confirm they know RUSTC_… compiler-team#350</a></p>



<a name="208461575"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/how%20does%20release%20branching%20work%3F/near/208461575" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/how.20does.20release.20branching.20work.3F.html#208461575">(Aug 30 2020 at 00:47)</a>:</h4>
<p>Sorry if I'm missing something, but why is rustc compiled using the latest beta rather than the nightly that the beta was built from? Wouldn't that avoid the need for <code>RUSTC_BOOTSTRAP</code>?</p>



<a name="208464130"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/how%20does%20release%20branching%20work%3F/near/208464130" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/how.20does.20release.20branching.20work.3F.html#208464130">(Aug 30 2020 at 02:09)</a>:</h4>
<p>you'd have to ask <span class="user-mention" data-user-id="116122">@simulacrum</span> about that one haha</p>



<a name="208464170"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/how%20does%20release%20branching%20work%3F/near/208464170" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/how.20does.20release.20branching.20work.3F.html#208464170">(Aug 30 2020 at 02:10)</a>:</h4>
<p>the reason the <em>beta</em> isn't built with latest nightly is it will likely no longer compile</p>



<a name="208464177"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/how%20does%20release%20branching%20work%3F/near/208464177" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/how.20does.20release.20branching.20work.3F.html#208464177">(Aug 30 2020 at 02:10)</a>:</h4>
<p>Distros, for one, want to use stable releases to bootstrap the next stable.</p>



<a name="208464178"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/how%20does%20release%20branching%20work%3F/near/208464178" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/how.20does.20release.20branching.20work.3F.html#208464178">(Aug 30 2020 at 02:10)</a>:</h4>
<p>because some features will have been stabilized, etc. and it will no longer compile without warnings</p>



<a name="208471656"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/how%20does%20release%20branching%20work%3F/near/208471656" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/how.20does.20release.20branching.20work.3F.html#208471656">(Aug 30 2020 at 06:40)</a>:</h4>
<p><span class="user-mention silent" data-user-id="307537">Camelid</span> <a href="#narrow/stream/122651-general/topic/how.20does.20release.20branching.20work.3F/near/208461575">said</a>:</p>
<blockquote>
<p>Sorry if I'm missing something, but why is rustc compiled using the latest beta rather than the nightly that the beta was built from? Wouldn't that avoid the need for <code>RUSTC_BOOTSTRAP</code>?</p>
</blockquote>
<p>but then how to you build that nightly? you'd have to use the previous nightly and thus do a new build every single day.</p>
<p>so instead we ensure that each stable release of rust builds with the previous stable release, so this kind of "bootstraipping" does not involve nightlies.</p>



<a name="208471660"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/how%20does%20release%20branching%20work%3F/near/208471660" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/how.20does.20release.20branching.20work.3F.html#208471660">(Aug 30 2020 at 06:40)</a>:</h4>
<p>for the beta branch, this means using the previous beta</p>



<a name="208496449"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/how%20does%20release%20branching%20work%3F/near/208496449" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/how.20does.20release.20branching.20work.3F.html#208496449">(Aug 30 2020 at 17:49)</a>:</h4>
<p><span class="user-mention" data-user-id="120791">@RalfJ</span> I just meant that maybe you could use the same version of the compiler, but use the nightly build produced from it (which allows unstable features) instead of using the beta build that you have to "backdoor". But it seems there are other reasons for being able to bootstrap using a stable release :)</p>



<a name="208528239"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/how%20does%20release%20branching%20work%3F/near/208528239" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/how.20does.20release.20branching.20work.3F.html#208528239">(Aug 31 2020 at 07:42)</a>:</h4>
<p>@camelid there is no "nightly build produced from it".<br>
every commit pushed to <code>master</code> is built as nightly; every commit pushed to <code>beta</code> is built as beta; every commit pushed to <code>stable</code> is built as stable.</p>



<a name="208528265"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/how%20does%20release%20branching%20work%3F/near/208528265" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/how.20does.20release.20branching.20work.3F.html#208528265">(Aug 31 2020 at 07:42)</a>:</h4>
<p>also, if you use the same version of the compiler, then how to you build <em>that</em>? if you need rust 1.45 to build rust 1.45, that would be a problem. ;)<br>
fair warning: thinking too much about bootstrapping can break your head.^^</p>



<a name="208585339"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/how%20does%20release%20branching%20work%3F/near/208585339" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/how.20does.20release.20branching.20work.3F.html#208585339">(Aug 31 2020 at 16:50)</a>:</h4>
<p>we used to have a chosen nightly snapshot for stage0, bumped as needed</p>



<a name="208585453"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/how%20does%20release%20branching%20work%3F/near/208585453" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/how.20does.20release.20branching.20work.3F.html#208585453">(Aug 31 2020 at 16:51)</a>:</h4>
<p>later we switched to N-1 stage0 as a more stable base</p>
<ul>
<li>stable N builds from stable N-1</li>
<li>beta N builds from stable N-1</li>
<li>nightly N builds from beta N-1</li>
</ul>



<a name="208585628"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/how%20does%20release%20branching%20work%3F/near/208585628" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/how.20does.20release.20branching.20work.3F.html#208585628">(Aug 31 2020 at 16:52)</a>:</h4>
<p>and then we allowed stage0 to also be a "rebuild", especially for distros needing to build stable N from stable N again for patches etc., since distro repos usually only carry the most recent version</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>